home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / AWARE_H.PAK / DBLKUPLB.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  6KB  |  160 lines

  1. //--------------------------------------------------------
  2. // DBLKUPLB.H generated from BDBCTL.VBX
  3. // Copyright (C) 1996 Borland International
  4. //--------------------------------------------------------
  5.  
  6. #if !defined(DBLOOKUPLIST_H_)
  7. #define DBLOOKUPLIST_H_
  8.  
  9. #include <vdbt/dbcontrl.h>
  10.  
  11. //--------------------------------------------------------
  12. // TDBLookupList (VB3, subclassed from LISTBOX)
  13. //--------------------------------------------------------
  14.  
  15. class _DBAWARECLASS TDBLookupList : public TDBControl {
  16.   DBPMECLASS( TDBLookupList );
  17.  
  18.   // constructors
  19.   DECLARE_CONSTRUCTORS( TDBLookupList );
  20.  
  21.   public:
  22.     // Properties
  23.     DECLARE_DB_PROP_RW2( TField, DataField );
  24.     DECLARE_DB_PROP_RW0( Bool,  DataChanged,   Prop_TDBLookupList_DataChanged );
  25.     DECLARE_DB_PROP_RW0( COLORREF,ForeColor,   Prop_TDBLookupList_ForeColor );
  26.     DECLARE_DB_PROP_RW0( COLORREF,BackColor,   Prop_TDBLookupList_BackColor );
  27.     DECLARE_DB_PROP_RW2( string,FontName );
  28.     DECLARE_DB_PROP_RW0( Bool,  FontBold,      Prop_TDBLookupList_FontBold );
  29.     DECLARE_DB_PROP_RW0( Bool,  FontItalic,    Prop_TDBLookupList_FontItalic );
  30.     DECLARE_DB_PROP_RW0( Bool,  FontStrikethru,Prop_TDBLookupList_FontStrikethru );
  31.     DECLARE_DB_PROP_RW0( Bool,  FontUnderline, Prop_TDBLookupList_FontUnderline );
  32.     DECLARE_DB_PROP_RW0( float, FontSize,      Prop_TDBLookupList_FontSize );
  33.     DECLARE_DB_PROP_RW1( ENUM, TBorderStyle
  34.                              ,  BorderStyle,   Prop_TDBLookupList_BorderStyle );
  35.     DECLARE_DB_PROP_RW2( string,Caption );
  36.     DECLARE_DB_PROP_RW2( string,DisplayValue );
  37.     DECLARE_DB_PROP_RW0( int,   FieldCount,    Prop_TDBLookupList_FieldCount );
  38.     DECLARE_DB_PROP_RW0( Bool,  IntegralHeight,Prop_TDBLookupList_IntegralHeight );
  39.     DECLARE_DB_PROP_RW0( int,   ItemHeight,    Prop_TDBLookupList_ItemHeight );
  40.     DECLARE_DB_PROP_RW0( int,   ItemIndex,     Prop_TDBLookupList_ItemIndex );
  41.     DECLARE_DB_PROP_RW2( TDataSource,LookupSource );
  42.     DECLARE_DB_PROP_RW2( TField,     LookupField );
  43.     DECLARE_DB_PROP_RW2( string,LookupDisplay );
  44.     DECLARE_DB_PROP_RW1( USHORT, TDBLookupListOptions
  45.                                ,Options,      Prop_TDBLookupList_Options );
  46.     DECLARE_DB_PROP_RW0( Bool,  ReadOnly,     Prop_TDBLookupList_ReadOnly );
  47.     DECLARE_DB_PROP_RO2( TField,SelectedField );
  48.     DECLARE_DB_PROP_RW0( int,   SelectedIndex,Prop_TDBLookupList_SelectedIndex );
  49.     DECLARE_DB_PROP_RW0( Bool,  Sorted,        Prop_TDBLookupList_Sorted );
  50.     DECLARE_DB_PROP_RW1( ENUM, TListBoxStyle
  51.                              ,  Style,         Prop_TDBLookupList_Style );
  52.     DECLARE_DB_PROP_RW2( string,Value );
  53.   private:
  54.     DECLARE_DB_PROP_RO1( long, HCTL
  55.                              ,  LookupHCTL,    Prop_TDBLookupList_LookupHctl );
  56.  
  57.  
  58.   private:
  59.     void FireOnClick()
  60.     {
  61.       OnClickSource( *this );
  62.     }
  63.     void FireOnDragDrop( TVbxControl& Source, SHORT x, SHORT y )
  64.     {
  65.       OnDragDropSource( *this, Source, x, y );
  66.     }
  67.     void FireOnDragOver( TVbxControl& Source, SHORT x, SHORT y, TDragState State )
  68.     {
  69.       OnDragOverSource( *this, Source, x, y, State );
  70.     }
  71.     void FireOnEndDrag( TVbxControl& Source, SHORT x, SHORT y )
  72.     {
  73.       OnEndDragSource( *this, Source, x, y );
  74.     }
  75.     void FireOnDblClick()
  76.     {
  77.       OnDblClickSource( *this );
  78.     }
  79.     void FireOnEnter()
  80.     {
  81.       OnEnterSource( *this );
  82.     }
  83.     void FireOnExit()
  84.     {
  85.       OnExitSource( *this );
  86.     }
  87.     void FireOnKeyDown( SHORT *Key, TShiftState State )
  88.     {
  89.       OnKeyDownSource( *this, Key, State );
  90.     }
  91.     void FireOnKeyPress( SHORT Key )
  92.     {
  93.       OnKeyPressSource( *this, Key );
  94.     }
  95.     void FireOnKeyUp( SHORT *Key, TShiftState State )
  96.     {
  97.       OnKeyUpSource( *this, Key, State );
  98.     }
  99.  
  100.   public:
  101.     // Event Source
  102.     DECLARE_SOURCE( OnClick,    TDBLookupListNotify );
  103.     DECLARE_SOURCE( OnDblClick, TDBLookupListNotify );
  104.     DECLARE_SOURCE( OnDragDrop, TDBLookupListDrag );
  105.     DECLARE_SOURCE( OnDragOver, TDBLookupListDragOver );
  106.     DECLARE_SOURCE( OnEndDrag,  TDBLookupListDrag );
  107.     DECLARE_SOURCE( OnEnter,    TDBLookupListNotify );
  108.     DECLARE_SOURCE( OnExit,     TDBLookupListNotify );
  109.     DECLARE_SOURCE( OnKeyDown,  TDBLookupListKey );
  110.     DECLARE_SOURCE( OnKeyPress, TDBLookupListKeyPress );
  111.     DECLARE_SOURCE( OnKeyUp,    TDBLookupListKey );
  112.  
  113.     // Event Handlers
  114.     DECLARE_DB_EVENT( OnClick,    TNotifyEvent );
  115.     DECLARE_DB_EVENT( OnDragDrop, TDragEvent );
  116.     DECLARE_DB_EVENT( OnDragOver, TDragOverEvent );
  117.     DECLARE_DB_EVENT( OnEndDrag,  TDragEvent );
  118.     DECLARE_DB_EVENT( OnDblClick, TNotifyEvent );
  119.     DECLARE_DB_EVENT( OnEnter,    TNotifyEvent );
  120.     DECLARE_DB_EVENT( OnExit,     TNotifyEvent );
  121.     DECLARE_DB_EVENT( OnKeyDown,  TKeyEvent );
  122.     DECLARE_DB_EVENT( OnKeyPress, TKeyPressEvent );
  123.     DECLARE_DB_EVENT( OnKeyUp,    TKeyEvent );
  124.  
  125.   protected:
  126.     char far* GetClassName();
  127.  
  128. #ifdef __OWL_VBXCTL_H
  129.   DECLARE_RESPONSE_TABLE( TDBLookupList );
  130. #endif __OWL_VBXCTL_H
  131. };
  132.  
  133. // Inlines
  134. // Properties
  135. DEFINE_DB_PROP_DATAFIELD( TDBLookupList, _TDBLookupList )
  136. DEFINE_DB_PROP_LOOKUPFIELD( TDBLookupList, _TDBLookupList )
  137. DEFINE_DB_PROP_LOOKUPSOURCE( TDBLookupList )
  138. DEFINE_DB_PROP_STRING( TDBLookupList, _TDBLookupList, FontName );
  139. DEFINE_DB_PROP_STRING( TDBLookupList, _TDBLookupList, Caption );
  140. DEFINE_DB_PROP_STRING( TDBLookupList, _TDBLookupList, DisplayValue );
  141. DEFINE_DB_PROP_STRING( TDBLookupList, _TDBLookupList, LookupDisplay );
  142. DEFINE_DB_PROP_STRING( TDBLookupList, _TDBLookupList, Value );
  143.  
  144. inline TField* TDBLookupList::prSelectedField::Get()
  145. {
  146.   TDBLookupList *c = DBOUTER( SelectedField );
  147.  
  148.   return p = ::GetField( c, Prop_TDBLookupList_SelectedField
  149.                        , c->LookupSource, p );
  150. }
  151.  
  152.  
  153. // Methods
  154. inline char far* TDBLookupList::GetClassName()
  155. {
  156.   return "DBLOOKUPLIST";
  157. }
  158.  
  159. #endif DBLOOKUPLIST_H_
  160.